package cn.easybuy.vo;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class Cart {
	public List<ProductVo> items = new ArrayList<ProductVo>();
	private Float sum;

	public Float getSum() {
	    sum = 0f;
	    for (ProductVo productVo:items){
	        sum +=productVo.getCost();
        }
		return sum;
	}

}
